package com.spz.demo.scloud.provider.service;

import com.spz.demo.scloud.common.service.AppService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * App Service 接口实现类
 */
@Service
public class AppServiceImpl implements AppService {

    /**
     * 项目端口
     */
    @Value("${server.port}")
    private Integer projectServerPort;

    /**
     * 项目名称
     */
    @Value("${spring.application.name}")
    private String projectApplicationName;

    @Override
    public String instanceNameAndPort(){
        return projectApplicationName + ":" + projectServerPort + ": (基于Eureka注册中心)";
    }

}
